﻿

<!--********************* Part1:Jsp Head *********************-->

<%@ page contentType="text/html;charset=UTF-8"%>  
<%@ include file="/framework/head.jsp"%>

<!--********************* Part2:Java Code *********************-->
<%
	UserMenuinfoSearchEvent event = (UserMenuinfoSearchEvent)context.getSessionValue("UserMenuinfoSearchEvent");
	ObjectList list = UserMenuinfo.fetch().search(con,event);
%>

<!--********************* Part3:JavaScript Code ***************-->
<!--start 客户端脚本区域-->
<script language=javascript>

var list_code = "listUserMenuinfo";

function doSearch()
{

	SetValue("s_Id",GetValue("i_Id")); //ID

	SetValue("s_UserId",GetValue("i_UserId")); //用户ID

	SetValue("s_UserCode",GetValue("i_UserCode")); //用户编码

	SetValue("s_MenuId",GetValue("i_MenuId")); //菜单ID

	SetValue("s_MenuCode",GetValue("i_MenuCode")); //菜单编码
	

	SetValue("s_OrderField",GetValue("i_OrderField")); //排序
	SetValue("s_OrderDesc",getCheckBoxValues("i_OrderDesc")); //升降序
	doCommonSearch();
}

function bizViewUserMenuinfo(id)
{
	viewWin("<%=Config.getSrv()%>?action_code=viewUserMenuinfo&Id="+id);
}

function doDelete()
{
	if(!hasChooseRadio("ids"))
	{
		bizMessage("删除","用户拥有菜单配置");
		return false;
	}
	if(!bizConfirm("删除","用户拥有菜单配置")) return false;
	SetAction("deleteUserMenuinfo");
	frm.submit();
}

function doToAdd()
{
	SetAction("toAddUserMenuinfo");
	frm.submit();
}

function doToUpdate()
{
	if(!checkOne("ids")) 
	{
		bizMessage("修改","用户拥有菜单配置");
		return false;
	}
	SetValue("Id",getCheckBoxValue("ids"));
	SetAction("toUpdateUserMenuinfo");
	frm.submit();
}
function doToCopy()
{
	if(!checkOne("ids")) 
	{
		bizMessage("复制","用户拥有菜单配置");
		return false;
	}
	SetValue("Id",getCheckBoxValue("ids"));
	SetAction("toCopyUserMenuinfo");
	frm.submit();
}

key_InitDefault();
key_RegSubmitHandler(doSearch);
</script>


<%=uiBody%>>

<%@ include file="/framework/menu.jsp"%>

<!--********************* Part4:Form  ***************-->
<form id=frm action="<%=Config.getSrv()%>" method="post">
<input type=hidden name="action_code" value="">
<input type=hidden name="Id" value="">
<input type=hidden name=sortOrder value="1">

<!--查询条件保留区域-->

<input type=hidden name="s_Id" value="<%=event.getId()%>"> <!--ID-->

<input type=hidden name="s_UserId" value="<%=event.getUserId()%>"> <!--用户ID-->

<input type=hidden name="s_UserCode" value="<%=event.getUserCode()%>"> <!--用户编码-->

<input type=hidden name="s_MenuId" value="<%=event.getMenuId()%>"> <!--菜单ID-->

<input type=hidden name="s_MenuCode" value="<%=event.getMenuCode()%>"> <!--菜单编码-->


<%@ include file="/framework/list_head.jsp"%>

<br>
<!--********************* Part5:Search Area ***************-->
<%=uiSearchStart%>>
<%
	int key_tab = 1 ;
%>


	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			ID：
		</td>
		<%=uiSearchInputTDHead%>>
			<input type="text" class="texts" name="i_Id" size="20" value="<%=event.viewId()%>" key_tab="<%=key_tab++%>">
		</td>		
	</tr>

	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			用户ID：
		</td>
		<%=uiSearchInputTDHead%>>
			<input type="text" class="texts" name="i_UserId" size="20" value="<%=event.viewUserId()%>" key_tab="<%=key_tab++%>">
		</td>		
	</tr>

	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			用户编码：
		</td>
		<%=uiSearchInputTDHead%>>
			<input type="text" class="texts" name="i_UserCode" size="20" value="<%=event.viewUserCode()%>" key_tab="<%=key_tab++%>">
		</td>		
	</tr>

	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			菜单ID：
		</td>
		<%=uiSearchInputTDHead%>>
			<input type="text" class="texts" name="i_MenuId" size="20" value="<%=event.viewMenuId()%>" key_tab="<%=key_tab++%>">
		</td>		
	</tr>

	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			菜单编码：
		</td>
		<%=uiSearchInputTDHead%>>
			<input type="text" class="texts" name="i_MenuCode" size="20" value="<%=event.viewMenuCode()%>" key_tab="<%=key_tab++%>">
		</td>		
	</tr>


	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			按排序：
		</td>
		<%=uiSearchInputTDHead%>>	
			<select name="i_OrderField">
				<option value="" <%=(event.getOrderField().equals("1"))?"selected":""%>>设置排序字段</option>
				
				<option value="ID" <%=(event.getOrderField().equals("ID"))?"selected":""%>>ID</option>
				
				<option value="USER_ID" <%=(event.getOrderField().equals("USER_ID"))?"selected":""%>>用户ID</option>
				
				<option value="USER_CODE" <%=(event.getOrderField().equals("USER_CODE"))?"selected":""%>>用户编码</option>
				
				<option value="MENU_ID" <%=(event.getOrderField().equals("MENU_ID"))?"selected":""%>>菜单ID</option>
				
				<option value="MENU_CODE" <%=(event.getOrderField().equals("MENU_CODE"))?"selected":""%>>菜单编码</option>
				
			</select>
			&nbsp;&nbsp;
			<input type="radio" name="i_OrderDesc" value="false" <%=(event.isOrderDesc()==false)?"checked":""%> >升序
			<input type="radio" name="i_OrderDesc" value="true"  <%=(event.isOrderDesc()==true)?"checked":""%>  >降序
			<input type="button" value="查询" class="buttons" onclick="doSearch();return false;">&nbsp;<input type="button" value="清空" class="buttons" onclick="doClearEvent();return false;">
		</td>
	</tr>

<%=uiSearchEnd%>

<!--列表标题-->
<%=UIManager.addListHeadTitle("用户拥有菜单配置列表")%>

<!--********************* Part6:List Area ***************-->

<%=uiListStart%>>

<%@ include file="/framework/list_foot.jsp"%>

<%
	int index = 1 ;
%>	
	<%=uiListHeadTR%>>
		<%=UIManager.addListHeadCheckBox() %>

		<%=UIManager.addListHead("ID",index++)%>

		<%=UIManager.addListHead("用户ID",index++)%>

		<%=UIManager.addListHead("用户编码",index++)%>

		<%=UIManager.addListHead("菜单ID",index++)%>

		<%=UIManager.addListHead("菜单编码",index++,"num")%>
     
		<%=UIManager.addListHead("操作",-1)%>  
	<%=uiListHeadTREnd%>>
	
	<!--data-->
<%
	for(int i=0;i<list.size();i++)
	{
		UserMenuinfo obj = (UserMenuinfo)list.get(i);
%>
	<%=uiListDataTR[i%2]%> align=center>
    	<%=uiListDataTD%>>
    		<input type="checkbox" name="ids" value="<%=obj.getId()%>">
    	</td>
    	
    
    	<%=uiListDataTD%>><%=obj.viewId(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewUserId(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewUserCode(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewMenuId(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewMenuCode(con)%></td>
        

    	<%=uiListDataTD%>>
    		<a href="" onclick="bizViewUserMenuinfo('<%=obj.getId()%>');return false;">浏览</a>
    	</td>
  	</tr>
<%	
	}
%>  

<%@ include file="/framework/list_foot2.jsp"%>

<%=uiListEnd%>


<!--********************* Part7:Action Area ***************-->
<%=uiCommandStart%>>
	<%=uiCommandTR%>>
		<%=uiCommandTD%>>
		<input type=button value="    添加   " class="buttons" onclick="doToAdd();return false;">
		<!--
		<input type=button value="    复制   " class="buttons" onclick="doToCopy();return false;">
		-->
		<input type=button value="    修改   " class="buttons" onclick="doToUpdate();return false;">
		<input type=button value="    删除   " class="buttons" onclick="doDelete();return false;">
		</td>
	</tr>	
<%=uiCommandEnd%>
</form>


<%@ include file="/framework/foot.jsp"%>

<!--
	Author    :Jackey
	FileName  :/system/base/UserMenuinfoList.jsp
-->
